<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>把数字变成字符数组</title>
</head>
<body>
    
</body>
</html>
<script>
        var n = 12345;
        var str = n.toString();      //toString()返回string对象
        var arr=str.split("");      //split()把一个字符串分割成字符串数组
        console.log(arr);
</script>